home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacHaskell 2.2 / cl-support / PORTING < prev    next >
Encoding:
Text File  |  1994-09-27  |  4.8 KB  |  89 lines  |  [TEXT/ttxt]

  1. ere there
  2.     are #+ things for the other dialects.
  3.  
  4.     As a matter of style, try to make an explicit case for each Lisp
  5.     instead of using #- to test for it *not* being a particular dialect.
  6.     This will prevent confusion on future ports.
  7.  
  8.     You may also need/want to add conditionals to the primitive 
  9.     implementation files in the runtime directory.
  10.  
  11.     Do not add #+/#- conditionalizations to any other random .scm
  12.     files, since we want to keep this implementation-dependent stuff 
  13.     centralized.
  14.  
  15. (2) Make subdirectories to hold compiled files in each of the source
  16.     directories.  The name of the subdirectory must match the constant
  17.     lisp-implementation-name in cl-definitions.lisp.
  18.  
  19. (3) Try compiling the Haskell system (by loading cl-init.lisp) and
  20.     fix any compilation warnings that happen.  (Hopefully there won't
  21.     be any.)
  22.  
  23.     You probably want to build a system initially with the default
  24.     compiler settings and verbose compiler diagnostics.  This will make 
  25.     any problems that show up later easier to debug.  Also, it is
  26.     helpful to capture all the messages in a dribble file to make it
  27.     easier to verify that everything went OK.
  28.  
  29. (4) Try compiling the prelude using (compile/prelude *prelude-unit*).
  30.     You need to create a subdirectory in the progs/prelude directory
  31.     to hold the output files, and define $PRELUDEBIN to point at
  32.     this directory (see the haskell-setup script).
  33.  
  34.     The important thing at this point is that the prelude makes it all 
  35.     the way through the codegen phase and produces Lisp code.  Don't worry
  36.     too much now if the Lisp compiler has trouble digesting the output.
  37.  
  38.     Once you get to this stage, it's time to start messing with
  39.     compiler optimize proclamations.  We generally use (speed 3) and
  40.     (safety 0).  Also, you should figure out how to suppress any
  41.     compiler messages (e.g., set *compile-print* and *compile-verbose*
  42.     to false).  We usually leave *compile-verbose* on during compilation
  43.     of the Haskell compiler, but turn it off later so that people don't
  44.     get messages from the Lisp compiler when running Haskell programs.
  45.  
  46. (5) Make a subdirectory in the com directory and make the following set 
  47.     of scripts there:
  48.  
  49.     clean -- remove all binary files.  Also change the main com/clean
  50.       script to invoke this.
  51.     compile -- recompile everything with the right compiler flags (see 
  52.       step 5).
  53.     build-prelude -- run the prelude through the haskell compiler.
  54.       This should save the old compiled prelude files as old-prelude.*
  55.       case something goes wrong.
  56.     savesys -- load the compiled prelude and save a core file.
  57.       This should also be careful not to overwrite an existing file.
  58.  
  59.     Look at the scripts that have already been written for other Lisps
  60.     for hints.
  61.  
  62.     At some point you also need to put a README file in this directory.
  63.  
  64.  
  65. (6) Now it's time to get serious about getting the prelude to compile.
  66.     Use the clean, compile, and build-prelude scripts you just wrote.
  67.  
  68.     Some compilers have a hard time dealing with the large pieces of
  69.     Lisp code produced for the prelude.  You will probably need to do 
  70.     something to make the heap bigger.  (And, make sure the machine
  71.     you are using to do the build on has plenty of swap space.)  You 
  72.     may also need to tweak the chunk-size parameters to force the 
  73.     output to be split up into smaller pieces.
  74.  
  75.     It's OK to leave the prelude interface file as a source file, or
  76.     to compile it with low speed optimizations.  On the other hand,
  77.     the prelude code file ought to be processed with as many speed
  78.     optimizations as possible.
  79.  
  80. (7) Build a new executable using the "savesys" script and take it for
  81.     a test drive.
  82.  
  83. (8) You must also hack the emacs interface file, emacs-tools/haskell.el,
  84.     to recognize when it's gotten into the debugger or break loop.
  85.     To test your new executable with the emacs stuff, you must
  86.     define the environment variable HASKELLPROG to point at it, or
  87.     set the emacs variable haskell-program-name.
  88.  
  89. (9) If you want to use t